package com.bear.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * <简述>
 * <详细描述>
 *
 * @author LiuShanshan
 * @version $Id$
 */
@RestController
public class SendMessgeController{

    @Autowired
    private RabbitTemplate rabbitTemplate;


    @GetMapping("/sendDirectMessage")
    public void sendDirectMessage(){
        rabbitTemplate.convertAndSend("TestDirectExchange", "TestDirectRouting", "direct测试");
    }
}
